// 收藏相关的mock数据
import { mock, Random } from 'mockjs'

// 获取收藏列表
export const getCollectionList = mock({
  'code': 1,
  'msg': '操作成功',
  'data': {
    'collectionList': {
      'total': '@integer(10, 50)',
      'per_page': 10,
      'current_page': 1,
      'last_page': '@integer(1, 5)',
      'data|10': [{
        'id': '@id',
        'user_id': '@integer(1, 100)',
        'aid': '@integer(1, 1000)',
        'type': 'archives',
        'createtime': '@integer(1600000000, 1630000000)',
        'updatetime': '@integer(1600000000, 1630000000)',
        'archives': {
          'id': '@id',
          'eid': '@string("lower", 10)',
          'title': '@ctitle(10, 30)',
          'image': '@image("200x150", "#4A7BF7", "CMS")',
          'images': '@image("200x150"),@image("200x150"),@image("200x150")',
          'images_list|3': ['@image("200x150", "#4A7BF7", "CMS")'],
          'channel_id': '@integer(1, 10)',
          'channel': {
            'id': '@integer(1, 10)',
            'name': '@cword(2, 4)',
            'image': '@image("100x100", "#4A7BF7", "CMS")',
            'diyname': '@word(5, 10)',
            'items': '@integer(50, 200)'
          },
          'user_id': '@integer(1, 100)',
          'user': {
            'id': '@integer(1, 100)',
            'nickname': '@cname',
            'avatar': '@image("100x100", "#4A7BF7", "Avatar")'
          },
          'likes': '@integer(0, 1000)',
          'dislikes': '@integer(0, 100)',
          'comments': '@integer(0, 500)',
          'views': '@integer(100, 10000)',
          'create_date': '@date("yyyy-MM-dd")',
          'createtime': '@integer(1600000000, 1630000000)'
        }
      }]
    }
  }
})

// 添加收藏
export const addCollection = mock({
  'code': 1,
  'msg': '收藏成功',
  'data': null
})

// 删除收藏
export const deleteCollection = mock({
  'code': 1,
  'msg': '取消收藏成功',
  'data': null
})